package com.qire.manhua.model.enumeration;

/**
 * 漫画付费类型 0全免费 1 vip免费 2章节免费 3 vip限时免费
 */
public enum FreeType {
    NONE(-1),
    AllFree(0),
    VipFree(1),
    ChapterFree(2),
    VipLimitTimeFree(3);

    public final int typeValue;

    FreeType(int typeValue){
        this.typeValue = typeValue;
    }

    public static FreeType build(int typeValue){
        FreeType type;
        switch (typeValue){
            case 0:
                type = AllFree;
                break;
            case 1:
                type = VipFree;
                break;
            case 2:
                type = ChapterFree;
                break;
            case 3:
                type = VipLimitTimeFree;
                break;
            default:
                type = NONE;
        }
        return type;
    }
}
